package com.ssm.controller;

import com.ssm.model.Order_book;
import com.ssm.service.Order_bookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class Order_bookController {
    @Autowired
    Order_bookService order_bookService;

    @RequestMapping("/ssssss")

    public String selectAllOrder_book(Model model)
    {
        List<Order_book> orders = order_bookService.selectAllOrder_book();
        model.addAttribute("orders", orders);
        return "order_book";
    }

    @RequestMapping("/toorderbookmanage")
    public String toorderbookmamage(Model model)
    {
        List<Order_book> order_books = order_bookService.selectAllOrder_book();
        model.addAttribute("order_books", order_books);
        return "order_book_manage";
    }

}
